package com.why;

import com.why.connector.SqlSessionFactoryBuilder;
import com.why.connector.factory.DefualtSqlSessionFactory;
import com.why.connector.factory.SqlSessionFactory;
import com.why.connector.session.SqlSession;

import java.io.InputStream;

public class Test {
    public static void main(String[] args) {
        InputStream stream = Test.class.getClassLoader().getResourceAsStream("sorm-config.xml");
        SqlSessionFactoryBuilder sqlSessionFactoryBuilder = new SqlSessionFactoryBuilder();
        SqlSessionFactory factory = sqlSessionFactoryBuilder.build(stream);


        SqlSession sqlSession = factory.openSqlSession();

        Object selectOne = sqlSession.selectOne("com.why.TestMethod.getSmartCardById", 10000000168L);
        System.out.println(selectOne);


    }

}
